package com.java.collection;

import java.util.Comparator;

public class MyComparator implements Comparator<Student> {
	/**
	 * s1.compareTo(s2)-->由大到小
	 * s2.compareTo(s1)-->由小到大
	 */
	public int compare(Student s1,Student s2) {
		return s1.getName().compareTo(s2.getName());
	}

}
